.class public Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;
.super Lcom/brixd/niceapp/activity/AbsBaseSwipeBackActivity;
.source "UserInfoModifyActivity.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;
    }
.end annotation


# static fields
.field private static final DEFAULT_COLOR:Ljava/lang/String; = "#08aad9"

.field private static final REQUEST_CODE_CROP_PICTURE:I = 0x2

.field private static final REQUEST_CODE_SELECT_PICTURE:I = 0x1


# instance fields
.field private mAdapter:Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;

.field private mAvatarImage:Landroid/widget/ImageView;

.field private mBackBtn:Landroid/widget/ImageButton;

.field private mBgGridView:Landroid/widget/GridView;

.field private mContentView:Landroid/view/View;

.field private mCurColor:Ljava/lang/String;

.field private mDoneBtn:Landroid/widget/ImageButton;

.field private mFemaleBtn:Landroid/widget/RadioButton;

.field private mGridSpace:I

.field private mGridWidth:I

.field private mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

.field private mMaleBtn:Landroid/widget/RadioButton;

.field private mMetrics:Landroid/util/DisplayMetrics;

.field private mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

.field private mProgressHUD:Lcom/zuiapps/suite/utils/hud/ProgressHUD;

.field private mSelectorImagePath:Ljava/lang/String;

.field private mTempFile:Ljava/io/File;

.field private mUserIntroEdt:Landroid/widget/EditText;

.field private mUserModel:Lcom/brixd/niceapp/model/UserModel;

.field private mUserNameEdt:Landroid/widget/EditText;


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 75
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/AbsBaseSwipeBackActivity;-><init>()V

    .line 540
    return-void
.end method

.method static synthetic access$000(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    .prologue
    .line 75
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$100(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    .prologue
    .line 75
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$1000(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    .prologue
    .line 75
    invoke-direct {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->hideDialog()V

    return-void
.end method

.method static synthetic access$1100(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;Ljava/lang/String;)V
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;
    .param p1, "x1"    # Ljava/lang/String;

    .prologue
    .line 75
    invoke-direct {p0, p1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->commitModify(Ljava/lang/String;)V

    return-void
.end method

.method static synthetic access$1200(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    .prologue
    .line 75
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$1300(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    .prologue
    .line 75
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$1400(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    .prologue
    .line 75
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$1500(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)I
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    .prologue
    .line 75
    iget v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mGridWidth:I

    return v0
.end method

.method static synthetic access$1600(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    .prologue
    .line 75
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$200(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    .prologue
    .line 75
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$300(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    .prologue
    .line 75
    invoke-direct {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->modifyInfo()V

    return-void
.end method

.method static synthetic access$400(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Ljava/lang/String;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    .prologue
    .line 75
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mCurColor:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$402(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;Ljava/lang/String;)Ljava/lang/String;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;
    .param p1, "x1"    # Ljava/lang/String;

    .prologue
    .line 75
    iput-object p1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mCurColor:Ljava/lang/String;

    return-object p1
.end method

.method static synthetic access$500(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;Ljava/lang/String;)I
    .registers 3
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;
    .param p1, "x1"    # Ljava/lang/String;

    .prologue
    .line 75
    invoke-direct {p0, p1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->parseColor(Ljava/lang/String;)I

    move-result v0

    return v0
.end method

.method static synthetic access$600(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    .prologue
    .line 75
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mAdapter:Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;

    return-object v0
.end method

.method static synthetic access$700(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Landroid/view/View;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    .prologue
    .line 75
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mContentView:Landroid/view/View;

    return-object v0
.end method

.method static synthetic access$800(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;

    .prologue
    .line 75
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$900(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;Ljava/lang/String;)V
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;
    .param p1, "x1"    # Ljava/lang/String;

    .prologue
    .line 75
    invoke-direct {p0, p1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->uploadImage(Ljava/lang/String;)V

    return-void
.end method

.method private commitModify(Ljava/lang/String;)V
    .registers 14
    .param p1, "imageUri"    # Ljava/lang/String;

    .prologue
    .line 415
    invoke-static {p0}, Lcom/brixd/niceapp/service/adapter/ReqRestAdapter;->niceAppAdapter(Landroid/content/Context;)Lretrofit/RestAdapter;

    move-result-object v4

    const-class v5, Lcom/brixd/niceapp/service/restful/UserRestfulRequest;

    invoke-virtual {v4, v5}, Lretrofit/RestAdapter;->create(Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/brixd/niceapp/service/restful/UserRestfulRequest;

    .line 416
    .local v0, "request":Lcom/brixd/niceapp/service/restful/UserRestfulRequest;
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserNameEdt:Landroid/widget/EditText;

    invoke-virtual {v4}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v1

    .line 417
    .local v1, "nick":Ljava/lang/String;
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserIntroEdt:Landroid/widget/EditText;

    invoke-virtual {v4}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v2

    .line 418
    .local v2, "intro":Ljava/lang/String;
    const-string v3, ""

    .line 419
    .local v3, "gender":Ljava/lang/String;
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mMaleBtn:Landroid/widget/RadioButton;

    invoke-virtual {v4}, Landroid/widget/RadioButton;->isChecked()Z

    move-result v4

    if-eqz v4, :cond_56

    .line 420
    const-string v3, "\u7537"

    .line 425
    :cond_34
    :goto_34
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v4}, Lcom/brixd/niceapp/model/UserModel;->getUid()I

    move-result v4

    invoke-static {v4}, Lcom/brixd/niceapp/util/SecrUtils;->makeToken(I)Lcom/brixd/niceapp/model/Token;

    move-result-object v11

    .line 426
    .local v11, "token":Lcom/brixd/niceapp/model/Token;
    iget-object v5, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mCurColor:Ljava/lang/String;

    invoke-virtual {v11}, Lcom/brixd/niceapp/model/Token;->getTimestamp()J

    move-result-wide v6

    invoke-virtual {v11}, Lcom/brixd/niceapp/model/Token;->getUid()I

    move-result v8

    invoke-virtual {v11}, Lcom/brixd/niceapp/model/Token;->getSecr()Ljava/lang/String;

    move-result-object v9

    new-instance v10, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$9;

    invoke-direct {v10, p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$9;-><init>(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)V

    move-object v4, p1

    invoke-interface/range {v0 .. v10}, Lcom/brixd/niceapp/service/restful/UserRestfulRequest;->modifyUserInfo(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JILjava/lang/String;Lretrofit/Callback;)V

    .line 445
    return-void

    .line 421
    .end local v11    # "token":Lcom/brixd/niceapp/model/Token;
    :cond_56
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mFemaleBtn:Landroid/widget/RadioButton;

    invoke-virtual {v4}, Landroid/widget/RadioButton;->isChecked()Z

    move-result v4

    if-eqz v4, :cond_34

    .line 422
    const-string v3, "\u5973"

    goto :goto_34
.end method

.method private computeGridWidth()V
    .registers 6

    .prologue
    .line 260
    iget-object v2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mMetrics:Landroid/util/DisplayMetrics;

    iget v1, v2, Landroid/util/DisplayMetrics;->widthPixels:I

    .line 261
    .local v1, "screenWidth":I
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f090030

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v2

    iput v2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mGridSpace:I

    .line 262
    const/4 v2, 0x1

    const/high16 v3, 0x41f00000

    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mMetrics:Landroid/util/DisplayMetrics;

    invoke-static {v2, v3, v4}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v2

    float-to-int v0, v2

    .line 263
    .local v0, "padding":I
    mul-int/lit8 v2, v0, 0x2

    sub-int v2, v1, v2

    iget v3, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mGridSpace:I

    mul-int/lit8 v3, v3, 0x5

    sub-int/2addr v2, v3

    div-int/lit8 v2, v2, 0x6

    iput v2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mGridWidth:I

    .line 264
    return-void
.end method

.method private createTempFile()Ljava/io/File;
    .registers 7

    .prologue
    .line 454
    invoke-static {}, Lcom/brixd/niceapp/application/NiceAppApplication;->getAppBaseDirName()Ljava/lang/String;

    move-result-object v0

    .line 455
    .local v0, "baseCacheLocation":Ljava/lang/String;
    new-instance v2, Ljava/io/File;

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    sget-object v5, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "temp"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-direct {v2, v4}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 456
    .local v2, "tempDir":Ljava/io/File;
    invoke-virtual {v2}, Ljava/io/File;->exists()Z

    move-result v4

    if-eqz v4, :cond_39

    .line 457
    invoke-virtual {v2}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Lcom/zuiapps/suite/utils/file/FileUtil;->deleteAllFiles(Ljava/lang/String;)V

    .line 462
    :goto_2f
    const/4 v3, 0x0

    .line 464
    .local v3, "tempFile":Ljava/io/File;
    :try_start_30
    const-string v4, "img_"

    const-string v5, ".jpg"

    invoke-static {v4, v5, v2}, Ljava/io/File;->createTempFile(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/io/File;
    :try_end_37
    .catch Ljava/io/IOException; {:try_start_30 .. :try_end_37} :catch_3d

    move-result-object v3

    .line 469
    :goto_38
    return-object v3

    .line 459
    .end local v3    # "tempFile":Ljava/io/File;
    :cond_39
    invoke-virtual {v2}, Ljava/io/File;->mkdirs()Z

    goto :goto_2f

    .line 465
    .restart local v3    # "tempFile":Ljava/io/File;
    :catch_3d
    move-exception v1

    .line 466
    .local v1, "e":Ljava/io/IOException;
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_38
.end method

.method private hideDialog()V
    .registers 2

    .prologue
    .line 448
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mProgressHUD:Lcom/zuiapps/suite/utils/hud/ProgressHUD;

    if-eqz v0, :cond_f

    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->isFinishing()Z

    move-result v0

    if-nez v0, :cond_f

    .line 449
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mProgressHUD:Lcom/zuiapps/suite/utils/hud/ProgressHUD;

    invoke-virtual {v0}, Lcom/zuiapps/suite/utils/hud/ProgressHUD;->dismiss()V

    .line 451
    :cond_f
    return-void
.end method

.method private initData()V
    .registers 4

    .prologue
    const v2, 0x7f02010e

    const/4 v1, 0x1

    .line 132
    invoke-static {}, Lcom/brixd/niceapp/service/UserService;->getLoginUser()Lcom/brixd/niceapp/model/UserModel;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    .line 133
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v0}, Lcom/brixd/niceapp/model/UserModel;->getBgColor()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mCurColor:Ljava/lang/String;

    .line 134
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mMetrics:Landroid/util/DisplayMetrics;

    .line 135
    invoke-direct {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->computeGridWidth()V

    .line 137
    invoke-static {}, Lcom/nostra13/universalimageloader/core/ImageLoader;->getInstance()Lcom/nostra13/universalimageloader/core/ImageLoader;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    .line 138
    new-instance v0, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    invoke-direct {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;-><init>()V

    .line 139
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->resetViewBeforeLoading(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheInMemory(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 140
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheOnDisc(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    sget-object v1, Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;->EXACTLY:Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;

    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->imageScaleType(Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    sget-object v1, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;

    .line 141
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->bitmapConfig(Landroid/graphics/Bitmap$Config;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    new-instance v1, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;

    invoke-direct {v1}, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;-><init>()V

    .line 142
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->displayer(Lcom/nostra13/universalimageloader/core/display/BitmapDisplayer;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 143
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnFail(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 144
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnLoading(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 145
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageForEmptyUri(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->build()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    .line 147
    new-instance v0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;

    invoke-static {}, Lcom/brixd/niceapp/util/SettingUtils;->getPersonalBgColors()Ljava/util/List;

    move-result-object v1

    invoke-direct {v0, p0, v1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;-><init>(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;Ljava/util/List;)V

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mAdapter:Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;

    .line 149
    return-void
.end method

.method private initWidgets()V
    .registers 6

    .prologue
    const/4 v3, 0x1

    .line 153
    const v1, 0x7f0a00a4

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    iput-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mContentView:Landroid/view/View;

    .line 154
    const v1, 0x7f0a0076

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mAvatarImage:Landroid/widget/ImageView;

    .line 155
    const v1, 0x7f0a00ab

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    iput-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserNameEdt:Landroid/widget/EditText;

    .line 156
    const v1, 0x7f0a00ac

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    iput-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserIntroEdt:Landroid/widget/EditText;

    .line 157
    const v1, 0x7f0a00af

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/RadioButton;

    iput-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mMaleBtn:Landroid/widget/RadioButton;

    .line 158
    const v1, 0x7f0a00b0

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/RadioButton;

    iput-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mFemaleBtn:Landroid/widget/RadioButton;

    .line 159
    const v1, 0x7f0a00b2

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/GridView;

    iput-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mBgGridView:Landroid/widget/GridView;

    .line 160
    const v1, 0x7f0a002d

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageButton;

    iput-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mBackBtn:Landroid/widget/ImageButton;

    .line 161
    const v1, 0x7f0a0069

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageButton;

    iput-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mDoneBtn:Landroid/widget/ImageButton;

    .line 163
    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserNameEdt:Landroid/widget/EditText;

    iget-object v2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/model/UserModel;->getNick()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 164
    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserIntroEdt:Landroid/widget/EditText;

    iget-object v2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/model/UserModel;->getDescription()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 165
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getSwipeBackLayout()Lcom/brixd/android/swipeback/lib/SwipeBackLayout;

    move-result-object v1

    iget-object v2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserNameEdt:Landroid/widget/EditText;

    invoke-virtual {v1, v2}, Lcom/brixd/android/swipeback/lib/SwipeBackLayout;->addIgnoredView(Landroid/view/View;)V

    .line 166
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getSwipeBackLayout()Lcom/brixd/android/swipeback/lib/SwipeBackLayout;

    move-result-object v1

    iget-object v2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserIntroEdt:Landroid/widget/EditText;

    invoke-virtual {v1, v2}, Lcom/brixd/android/swipeback/lib/SwipeBackLayout;->addIgnoredView(Landroid/view/View;)V

    .line 169
    const-string v1, "\u7537"

    iget-object v2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/model/UserModel;->getGender()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_ce

    .line 170
    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mMaleBtn:Landroid/widget/RadioButton;

    invoke-virtual {v1, v3}, Landroid/widget/RadioButton;->setChecked(Z)V

    .line 175
    :cond_9d
    :goto_9d
    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mContentView:Landroid/view/View;

    iget-object v2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mCurColor:Ljava/lang/String;

    invoke-direct {p0, v2}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->parseColor(Ljava/lang/String;)I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/view/View;->setBackgroundColor(I)V

    .line 177
    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mBgGridView:Landroid/widget/GridView;

    iget-object v2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mAdapter:Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$BgGridAdapter;

    invoke-virtual {v1, v2}, Landroid/widget/GridView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 178
    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mBgGridView:Landroid/widget/GridView;

    invoke-virtual {v1}, Landroid/widget/GridView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    .line 179
    .local v0, "params":Landroid/view/ViewGroup$LayoutParams;
    iget v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mGridWidth:I

    mul-int/lit8 v1, v1, 0x2

    iget v2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mGridSpace:I

    add-int/2addr v1, v2

    iput v1, v0, Landroid/view/ViewGroup$LayoutParams;->height:I

    .line 181
    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    iget-object v2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/model/UserModel;->getImage()Ljava/lang/String;

    move-result-object v2

    iget-object v3, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mAvatarImage:Landroid/widget/ImageView;

    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v1, v2, v3, v4}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    .line 182
    return-void

    .line 171
    .end local v0    # "params":Landroid/view/ViewGroup$LayoutParams;
    :cond_ce
    const-string v1, "\u5973"

    iget-object v2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/model/UserModel;->getGender()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_9d

    .line 172
    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mFemaleBtn:Landroid/widget/RadioButton;

    invoke-virtual {v1, v3}, Landroid/widget/RadioButton;->setChecked(Z)V

    goto :goto_9d
.end method

.method private initWidgetsActions()V
    .registers 4

    .prologue
    .line 186
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getSwipeBackLayout()Lcom/brixd/android/swipeback/lib/SwipeBackLayout;

    move-result-object v1

    new-instance v2, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$1;

    invoke-direct {v2, p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$1;-><init>(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)V

    invoke-virtual {v1, v2}, Lcom/brixd/android/swipeback/lib/SwipeBackLayout;->setOnSwipeToFinishListener(Lcom/brixd/android/swipeback/lib/SwipeBackLayout$SwipeToFinishListener;)V

    .line 194
    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mBackBtn:Landroid/widget/ImageButton;

    new-instance v2, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$2;

    invoke-direct {v2, p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$2;-><init>(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)V

    invoke-virtual {v1, v2}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 203
    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mDoneBtn:Landroid/widget/ImageButton;

    new-instance v2, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$3;

    invoke-direct {v2, p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$3;-><init>(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)V

    invoke-virtual {v1, v2}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 212
    new-instance v0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$4;

    invoke-direct {v0, p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$4;-><init>(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)V

    .line 227
    .local v0, "onChangeAvatarClick":Landroid/view/View$OnClickListener;
    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mAvatarImage:Landroid/widget/ImageView;

    invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 228
    const v1, 0x7f0a00aa

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 230
    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mBgGridView:Landroid/widget/GridView;

    new-instance v2, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$5;

    invoke-direct {v2, p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$5;-><init>(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)V

    invoke-virtual {v1, v2}, Landroid/widget/GridView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    .line 243
    iget-object v1, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserIntroEdt:Landroid/widget/EditText;

    new-instance v2, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$6;

    invoke-direct {v2, p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$6;-><init>(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)V

    invoke-virtual {v1, v2}, Landroid/widget/EditText;->setOnEditorActionListener(Landroid/widget/TextView$OnEditorActionListener;)V

    .line 251
    return-void
.end method

.method private isDirty()Z
    .registers 7

    .prologue
    const/4 v3, 0x1

    .line 313
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserNameEdt:Landroid/widget/EditText;

    invoke-virtual {v4}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v2

    .line 314
    .local v2, "userName":Ljava/lang/String;
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserIntroEdt:Landroid/widget/EditText;

    invoke-virtual {v4}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v1

    .line 315
    .local v1, "userIntro":Ljava/lang/String;
    const-string v0, ""

    .line 316
    .local v0, "gender":Ljava/lang/String;
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mMaleBtn:Landroid/widget/RadioButton;

    invoke-virtual {v4}, Landroid/widget/RadioButton;->isChecked()Z

    move-result v4

    if-eqz v4, :cond_36

    .line 317
    const-string v0, "\u7537"

    .line 322
    :cond_29
    :goto_29
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v4}, Lcom/brixd/niceapp/model/UserModel;->getNick()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_41

    .line 342
    :cond_35
    :goto_35
    return v3

    .line 318
    :cond_36
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mFemaleBtn:Landroid/widget/RadioButton;

    invoke-virtual {v4}, Landroid/widget/RadioButton;->isChecked()Z

    move-result v4

    if-eqz v4, :cond_29

    .line 319
    const-string v0, "\u5973"

    goto :goto_29

    .line 326
    :cond_41
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v4}, Lcom/brixd/niceapp/model/UserModel;->getDescription()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_35

    .line 330
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v4}, Lcom/brixd/niceapp/model/UserModel;->getGender()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v0, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_35

    .line 334
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mCurColor:Ljava/lang/String;

    iget-object v5, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v5}, Lcom/brixd/niceapp/model/UserModel;->getBgColor()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_35

    .line 338
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mSelectorImagePath:Ljava/lang/String;

    invoke-static {v4}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    if-eqz v4, :cond_35

    .line 342
    const/4 v3, 0x0

    goto :goto_35
.end method

.method private modifyInfo()V
    .registers 5

    .prologue
    .line 278
    invoke-direct {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->validate()Z

    move-result v0

    if-eqz v0, :cond_2a

    .line 279
    invoke-direct {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->isDirty()Z

    move-result v0

    if-eqz v0, :cond_2f

    .line 280
    const-string v0, ""

    const v1, 0x7f040003

    const/4 v2, 0x0

    const/4 v3, 0x0

    invoke-static {p0, v0, v1, v2, v3}, Lcom/zuiapps/suite/utils/hud/ProgressHUD;->show(Landroid/content/Context;Ljava/lang/CharSequence;IZLandroid/content/DialogInterface$OnCancelListener;)Lcom/zuiapps/suite/utils/hud/ProgressHUD;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mProgressHUD:Lcom/zuiapps/suite/utils/hud/ProgressHUD;

    .line 281
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mSelectorImagePath:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_2b

    .line 282
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v0}, Lcom/brixd/niceapp/model/UserModel;->getImage()Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->commitModify(Ljava/lang/String;)V

    .line 292
    :cond_2a
    :goto_2a
    return-void

    .line 284
    :cond_2b
    invoke-direct {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->prepareUploadImages()V

    goto :goto_2a

    .line 287
    :cond_2f
    const v0, 0x7f0c00a5

    invoke-static {v0}, Lcom/brixd/niceapp/util/ToastUtils;->show(I)V

    .line 288
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->finish()V

    goto :goto_2a
.end method

.method private parseColor(Ljava/lang/String;)I
    .registers 5
    .param p1, "colorString"    # Ljava/lang/String;

    .prologue
    .line 269
    :try_start_0
    invoke-static {p1}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_3} :catch_5

    move-result v0

    .line 274
    .local v0, "color":I
    :goto_4
    return v0

    .line 270
    .end local v0    # "color":I
    :catch_5
    move-exception v1

    .line 271
    .local v1, "e":Ljava/lang/Exception;
    const-string v2, "#08aad9"

    invoke-static {v2}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v0

    .restart local v0    # "color":I
    goto :goto_4
.end method

.method private prepareUploadImages()V
    .registers 8

    .prologue
    .line 346
    iget-object v2, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserModel:Lcom/brixd/niceapp/model/UserModel;

    invoke-virtual {v2}, Lcom/brixd/niceapp/model/UserModel;->getUid()I

    move-result v2

    invoke-static {v2}, Lcom/brixd/niceapp/util/SecrUtils;->makeToken(I)Lcom/brixd/niceapp/model/Token;

    move-result-object v0

    .line 348
    .local v0, "token":Lcom/brixd/niceapp/model/Token;
    invoke-static {p0}, Lcom/brixd/niceapp/service/adapter/ReqRestAdapter;->niceAppAdapter(Landroid/content/Context;)Lretrofit/RestAdapter;

    move-result-object v2

    const-class v3, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    invoke-virtual {v2, v3}, Lretrofit/RestAdapter;->create(Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;

    .line 349
    .local v1, "request":Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;
    invoke-virtual {v0}, Lcom/brixd/niceapp/model/Token;->getTimestamp()J

    move-result-wide v2

    invoke-virtual {v0}, Lcom/brixd/niceapp/model/Token;->getUid()I

    move-result v4

    invoke-virtual {v0}, Lcom/brixd/niceapp/model/Token;->getSecr()Ljava/lang/String;

    move-result-object v5

    new-instance v6, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$7;

    invoke-direct {v6, p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$7;-><init>(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;)V

    invoke-interface/range {v1 .. v6}, Lcom/brixd/niceapp/service/restful/NiceAppRestfulRequest;->queryUpToken(JILjava/lang/String;Lretrofit/Callback;)V

    .line 370
    return-void
.end method

.method private startCrop(Landroid/net/Uri;I)V
    .registers 7
    .param p1, "uri"    # Landroid/net/Uri;
    .param p2, "size"    # I

    .prologue
    const/4 v3, 0x1

    .line 473
    new-instance v0, Landroid/content/Intent;

    const-string v1, "com.android.camera.action.CROP"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 474
    .local v0, "intent":Landroid/content/Intent;
    const-string v1, "image/*"

    invoke-virtual {v0, p1, v1}, Landroid/content/Intent;->setDataAndType(Landroid/net/Uri;Ljava/lang/String;)Landroid/content/Intent;

    .line 476
    const-string v1, "crop"

    const-string v2, "true"

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 479
    const-string v1, "aspectX"

    invoke-virtual {v0, v1, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 480
    const-string v1, "aspectY"

    invoke-virtual {v0, v1, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 483
    const-string v1, "outputX"

    invoke-virtual {v0, v1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 484
    const-string v1, "outputY"

    invoke-virtual {v0, v1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 485
    const-string v1, "return-data"

    invoke-virtual {v0, v1, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 487
    const/4 v1, 0x2

    invoke-virtual {p0, v0, v1}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->startActivityForResult(Landroid/content/Intent;I)V

    .line 488
    return-void
.end method

.method private uploadImage(Ljava/lang/String;)V
    .registers 10
    .param p1, "token"    # Ljava/lang/String;

    .prologue
    .line 373
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mSelectorImagePath:Ljava/lang/String;

    invoke-static {p0, v0}, Lcom/brixd/niceapp/util/ImageUtils;->compressImage(Landroid/content/Context;Ljava/lang/String;)Ljava/io/File;

    move-result-object v5

    .line 375
    .local v5, "tempFile":Ljava/io/File;
    if-eqz v5, :cond_2c

    invoke-virtual {v5}, Ljava/io/File;->length()J

    move-result-wide v0

    const-wide/16 v6, 0x0

    cmp-long v0, v0, v6

    if-lez v0, :cond_2c

    .line 376
    move-object v4, v5

    .line 381
    .local v4, "uploadFile":Ljava/io/File;
    :goto_13
    invoke-virtual {v4}, Ljava/io/File;->getName()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v4}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/brixd/niceapp/util/ImageUtils;->generateImageServerPath(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    .line 382
    .local v3, "serverPath":Ljava/lang/String;
    iget-object v6, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mHandler:Landroid/os/Handler;

    new-instance v0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$8;

    move-object v1, p0

    move-object v2, p1

    invoke-direct/range {v0 .. v5}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity$8;-><init>(Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;Ljava/io/File;)V

    invoke-virtual {v6, v0}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 412
    return-void

    .line 378
    .end local v3    # "serverPath":Ljava/lang/String;
    .end local v4    # "uploadFile":Ljava/io/File;
    :cond_2c
    new-instance v4, Ljava/io/File;

    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mSelectorImagePath:Ljava/lang/String;

    invoke-direct {v4, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .restart local v4    # "uploadFile":Ljava/io/File;
    goto :goto_13
.end method

.method private validate()Z
    .registers 5

    .prologue
    const/4 v2, 0x0

    .line 295
    iget-object v3, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserNameEdt:Landroid/widget/EditText;

    invoke-virtual {v3}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v1

    .line 296
    .local v1, "userName":Ljava/lang/String;
    iget-object v3, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mUserIntroEdt:Landroid/widget/EditText;

    invoke-virtual {v3}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    .line 298
    .local v0, "userIntro":Ljava/lang/String;
    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_29

    .line 299
    const-string v3, "\u8981\u586b\u5199\u6635\u79f0"

    invoke-static {v3}, Lcom/brixd/niceapp/util/ToastUtils;->show(Ljava/lang/String;)V

    .line 308
    :goto_28
    return v2

    .line 303
    :cond_29
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-eqz v3, :cond_35

    .line 304
    const-string v3, "\u8981\u586b\u5199\u4e00\u53e5\u8bdd\u7b80\u4ecb"

    invoke-static {v3}, Lcom/brixd/niceapp/util/ToastUtils;->show(Ljava/lang/String;)V

    goto :goto_28

    .line 308
    :cond_35
    const/4 v2, 0x1

    goto :goto_28
.end method


# virtual methods
.method protected onActivityResult(IILandroid/content/Intent;)V
    .registers 12
    .param p1, "requestCode"    # I
    .param p2, "resultCode"    # I
    .param p3, "data"    # Landroid/content/Intent;

    .prologue
    .line 492
    invoke-super {p0, p1, p2, p3}, Lcom/brixd/niceapp/activity/AbsBaseSwipeBackActivity;->onActivityResult(IILandroid/content/Intent;)V

    .line 493
    const/4 v4, -0x1

    if-ne p2, v4, :cond_9

    .line 494
    packed-switch p1, :pswitch_data_9e

    .line 538
    :cond_9
    :goto_9
    return-void

    .line 496
    :pswitch_a
    if-eqz p3, :cond_9

    .line 497
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "pick/"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {p3}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Lcom/zuiapps/suite/utils/log/LogUtil;->i(Ljava/lang/String;)V

    .line 498
    invoke-virtual {p3}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v4

    const/16 v5, 0x96

    invoke-direct {p0, v4, v5}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->startCrop(Landroid/net/Uri;I)V

    goto :goto_9

    .line 504
    :pswitch_30
    if-eqz p3, :cond_9

    .line 507
    :try_start_32
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "crop/"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {p3}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Lcom/zuiapps/suite/utils/log/LogUtil;->i(Ljava/lang/String;)V

    .line 508
    invoke-virtual {p3}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v0

    .line 509
    .local v0, "bundle":Landroid/os/Bundle;
    if-eqz v0, :cond_9

    .line 510
    const-string v4, "data"

    invoke-virtual {v0, v4}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v3

    check-cast v3, Landroid/graphics/Bitmap;

    .line 511
    .local v3, "photo":Landroid/graphics/Bitmap;
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mTempFile:Ljava/io/File;

    if-eqz v4, :cond_6b

    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mTempFile:Ljava/io/File;

    invoke-virtual {v4}, Ljava/io/File;->exists()Z

    move-result v4

    if-eqz v4, :cond_6b

    .line 512
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mTempFile:Ljava/io/File;

    invoke-virtual {v4}, Ljava/io/File;->delete()Z

    .line 515
    :cond_6b
    invoke-direct {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->createTempFile()Ljava/io/File;

    move-result-object v4

    iput-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mTempFile:Ljava/io/File;

    .line 516
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mTempFile:Ljava/io/File;

    if-eqz v4, :cond_9

    .line 517
    sget-object v4, Landroid/graphics/Bitmap$CompressFormat;->JPEG:Landroid/graphics/Bitmap$CompressFormat;

    const/16 v5, 0x64

    new-instance v6, Ljava/io/FileOutputStream;

    iget-object v7, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mTempFile:Ljava/io/File;

    invoke-direct {v6, v7}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V

    invoke-virtual {v3, v4, v5, v6}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 518
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mTempFile:Ljava/io/File;

    invoke-virtual {v4}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v4

    iput-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mSelectorImagePath:Ljava/lang/String;

    .line 521
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mSelectorImagePath:Ljava/lang/String;

    invoke-static {v4}, Landroid/graphics/drawable/BitmapDrawable;->createFromPath(Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    .line 522
    .local v1, "drawable":Landroid/graphics/drawable/Drawable;
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->mAvatarImage:Landroid/widget/ImageView;

    invoke-virtual {v4, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
    :try_end_96
    .catch Ljava/lang/Exception; {:try_start_32 .. :try_end_96} :catch_98

    goto/16 :goto_9

    .line 527
    .end local v0    # "bundle":Landroid/os/Bundle;
    .end local v1    # "drawable":Landroid/graphics/drawable/Drawable;
    .end local v3    # "photo":Landroid/graphics/Bitmap;
    :catch_98
    move-exception v2

    .line 528
    .local v2, "e":Ljava/lang/Exception;
    invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V

    goto/16 :goto_9

    .line 494
    :pswitch_data_9e
    .packed-switch 0x1
        :pswitch_a
        :pswitch_30
    .end packed-switch
.end method

.method public onBackPressed()V
    .registers 3

    .prologue
    .line 255
    invoke-super {p0}, Lcom/brixd/niceapp/activity/AbsBaseSwipeBackActivity;->onBackPressed()V

    .line 256
    invoke-virtual {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    const-string v1, "UserInfoModifyPageClickBack"

    invoke-static {v0, v1}, Lcom/umeng/analytics/MobclickAgent;->onEvent(Landroid/content/Context;Ljava/lang/String;)V

    .line 257
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .registers 3
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    .line 123
    invoke-super {p0, p1}, Lcom/brixd/niceapp/activity/AbsBaseSwipeBackActivity;->onCreate(Landroid/os/Bundle;)V

    .line 124
    const v0, 0x7f030022

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->setContentView(I)V

    .line 126
    invoke-direct {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->initData()V

    .line 127
    invoke-direct {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->initWidgets()V

    .line 128
    invoke-direct {p0}, Lcom/brixd/niceapp/userinfo/activity/UserInfoModifyActivity;->initWidgetsActions()V

    .line 129
    return-void
.end method

.method protected onPause()V
    .registers 2

    .prologue
    .line 116
    invoke-super {p0}, Lcom/brixd/niceapp/activity/AbsBaseSwipeBackActivity;->onPause()V

    .line 117
    const-string v0, "UserInfoModifyActivity"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageEnd(Ljava/lang/String;)V

    .line 118
    invoke-static {p0}, Lcom/umeng/analytics/MobclickAgent;->onPause(Landroid/content/Context;)V

    .line 119
    return-void
.end method

.method protected onResume()V
    .registers 2

    .prologue
    .line 108
    invoke-super {p0}, Lcom/brixd/niceapp/activity/AbsBaseSwipeBackActivity;->onResume()V

    .line 110
    const-string v0, "UserInfoModifyActivity"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageStart(Ljava/lang/String;)V

    .line 111
    invoke-static {p0}, Lcom/umeng/analytics/MobclickAgent;->onResume(Landroid/content/Context;)V

    .line 112
    return-void
.end method
